public class Main {
    public static void main(String[] args) {
        SingleLinkedList test = new SingleLinkedList();
        test.addFirst(1);
        test.addFirst(2);
        test.addFirst(3);
        test.addFirst(4);
        test.addFirst(5);
        test.display();


        test.clear();
        test.addLast(1);
        test.addLast(2);
        test.addLast(3);
        test.addLast(4);
        test.addLast(5);
        test.display();

        test.addIndex(3,333);
        test.addIndex(0,0);
        test.addIndex(7,555);
        test.display();

        System.out.println(test.contains(333));
        System.out.println(test.contains(555));

        test.remove(333);
        test.display();
        test.remove(0);
        test.display();

        test.addLast(3);
        test.addLast(3);
        test.addFirst(3);
        test.display();
        test.removeAllKey(3);
        test.display();

        System.out.println(test.size());
    }
}